/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package bea.cliente.environment;
import com.jme3.light.DirectionalLight;
import com.jme3.light.Light;
import com.jme3.light.PointLight;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Node;
import com.jme3.scene.control.LightControl;

/**
 *
 * @author Ivan da Silveira
 */
public class SunLightNode extends Node {
    
    // the light
    protected DirectionalLight light;
    // the control
    protected LightControl lightControl;
            
    public SunLightNode(String name) {
        super(name);
    }
    
    public void initialize(){
        // light
        light = new DirectionalLight();
        light.setColor(ColorRGBA.White);
        light.setName("sunLight");
        light.setDirection(Vector3f.NAN);
        
        // control
        lightControl = new LightControl(light, LightControl.ControlDirection.LightToSpatial);
        this.addControl(lightControl);
    }
}
